#include "../main.h"

void *start_routine(void *);

int main()
{

    pthread_t pthread_id[2] = {0};
    int ret = pthread_create(pthread_id,NULL,start_routine,(void *)"Hello Word!");
    if(0 != ret)
    {
        perror("pthread_create error");
        exit(EXIT_FAILURE);
    }
    ret = pthread_create(pthread_id+1,NULL,start_routine,(void *)"Hello Word!");
    if(0 != ret)
    {
        perror("pthread_create error");
        exit(EXIT_FAILURE);
    }
    pthread_join(pthread_id[0],NULL);
    pthread_join(pthread_id[1],NULL);
    return 0;
}

void *start_routine(void * arg)
{
    printf("%ld %s\n",pthread_self(),(char*)arg);
    pthread_exit(NULL);
}
